package edu.fiu.ann.threshold;

/**
 * The sigmoid squash function.
 *
 * @author Yexi Jiang (http://users.cis.fiu.edu/~yjian004/)
 * @date 2011-4-4
 */
public class Sigmoid extends ThresholdFunction{
	@Override
	public double f(double input) {
		return 1 / (1 + Math.exp(-input));
	}

	@Override
	public double partialDerivative(double input) {
		double value = f(input);
		return value * (1 - value);
	}
}
